Unless otherwise indicated herein, approaches described in this section are not prior art to the claims listed below and are not admitted to be prior art by inclusion in this section.
Digital color images are typically captured in the raw camera RGB space and displayed on monitors in a standard RGB space such as sRGB, for example. There are usually many image processing steps that take place to correct, manipulate, enhance, and convert a raw camera RGB image to a standard sRGB image. These image processing steps typically are done in the image signal processing (ISP) pipeline of a digital camera. Color manipulation, adjustment, and conversion are difficult to do effectively in RGB color space because the RGB color model does not map easily to color attributes that correlate closely with human color perception such as, for example, lightness, hue, and chroma. For instance, to avoid numerical overflow in processing bright and colorful objects, an approach is to simply clip RGB channels having numerical values that are too high or too low, such as those greater than 4095 (for 12-bit processing) or those less than 0. Color clipping in RGB space tends to change the hue dramatically. As a result, a bright and colorful purple flower may turn into red color as its blue channel is clipped, while skin color may become bright yellow around specular highlights when its red channel is clipped. Yet, another important step in color processing is to increase the colorfulness of natural images, where dull and low-contrast images may be processed to have enhanced color chroma, thus making such images look better. This is commonly done in advertisements and is becoming a common feature of digital cameras.
A key to doing color adjustment well is to transform colors from an RGB color space to a color space that is much better correlated with color appearance description, such as CIE 1976 L*a*b* (CIELAB) or CIE 1976 L*u*v* (CIELUV) uniform color spaces. For example, in CIELAB space, the angle between a* and b* axes is well correlated with the hue of a color, the L* is well correlated with its lightness, and the distance from (a*, b*) to (0, 0) is well correlated with its perceived chroma.
Although CIELAB is widely useful and highly successful in practical applications, it is not directly applicable to the majority of imaging devices, such as smartphone cameras, digital cameras, and document scanners. This is because CIELAB is based on XYZ tristimulus values calculated from CIE 1931 xyz color matching functions. In order to transform camera RGB to CIE XYZ, a standard practice is to use a customized 3×3 matrix for the color conversion. This practice may work well when the camera spectral sensitivities, herein interchangeably referred to as spectral sensitivity functions or sensor fundamentals, can be well approximated by linear combinations of the CIE 1931 xyz color matching functions. However, most smartphone cameras and consumer digital cameras fall far short of this condition due to the high manufacturing cost of color filters that can provide such a good approximation. Therefore, RGB transformation by a 3×3 matrix cannot produce good matches for the corresponding object colors in CIE XYZ values. Errors in such matrix transformation can be especially large for certain object colors. Furthermore, the output from a matrix transformation can be negative and not physically meaningful. When such condition happens, it is difficult to make a perceptually meaningful correction.